/**
 * Copyright (C), 2020-2021 by colley.ma
 * File Name: RateLimitEvent.java
 * Encoding: UTF-8
 * Date: 2021年3月26日 下午2:42:34
 * History:
 */
package com.swak.frame.ratelimit.event;

import org.springframework.context.ApplicationEvent;

import com.swak.frame.ratelimit.LimitType;
import com.swak.frame.ratelimit.config.LimitCommand;

public class RateLimitEvent extends ApplicationEvent {

    private static final long serialVersionUID = -6223060075858657948L;

    private final LimitCommand config;

    private final LimitType limitType;

    private final String resource;

    public RateLimitEvent(Object source, LimitCommand config, LimitType limitType,
        String resource) {
        super(source);
        this.config = config;
        this.limitType = limitType;
        this.resource = resource;
    }

    public LimitCommand getConfig() {
        return config;
    }

    public LimitType getLimitType() {
        return limitType;
    }

    public String getResource() {
        return resource;
    }
}
